<template>
	<view>

		<view style="width: 100%; height: 300rpx;" class="top">
			<view style="color: white; margin-left: 30rpx; margin-bottom: -30rpx; font-size: 25rpx; ">支付成功，请您前往指定的门店消费
			</view>

			<view style="display: flex; margin-top: 50rpx;padding: 10rpx; justify-content: space-between;">

				<view style="display: flex;">
					<image src="../../../static/商家.png"
						style="width: 35rpx; height: 35rpx;margin-left: 30rpx; margin-top: 10rpx;"></image>

					<view style="color: white; margin-left: 20rpx;" v-if="orderdemo != null && orderdemo.shop != null">
						<view style="font-size: 30rpx;">{{orderdemo.shop.shopName}}</view>
						<view> {{orderdemo.shop.shopArea}} {{orderdemo.shop.shopAddress}}</view>
					</view>
				</view>


				<image src="../../../static/plane.png" style="width: 35rpx; height: 35rpx;"></image>


			</view>

		</view>


		<uni-card :is-shadow="false" is-full
			style="width: 90%; border-radius: 15rpx; margin: auto; position: relative; top: -100rpx;">
			<view style="font-size: 40rpx; color: black;">订单详情</view>
			<view style="border-top: 10rpx solid #EEEEEE; margin-top: 10rpx;"></view>
			<view v-if="orderdemo != null">
				<view v-for="(item,index) in orderdemo.serviceList" :index="index" :key="index"
					style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
					<view>{{item.name}}</view>
					<view>{{item.newPrice}}</view>
				</view>
			</view>


			<!-- 	<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
					<view>汽车精洗</view>
					<view>$677</view>
				</view>
				 -->




		</uni-card>


		<uni-card :is-shadow="false" is-full
			style="width: 90%; border-radius: 15rpx; margin: auto; position: relative; top: -70rpx;">

			<view style="border-top: 10rpx solid #EEEEEE; margin-top: 10rpx;"></view>

			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>原价</view>
				<view>{{orderdemo?orderdemo.totalPrice:''}}</view>
			</view>

			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>现价</view>
				<view>{{orderdemo?orderdemo.realPrice:''}}</view>
			</view>



		</uni-card>




		<uni-card :is-shadow="false" is-full
			style="width: 90%; border-radius: 15rpx; margin: auto; position: relative; top: -70rpx;">

			<view style="border-top: 10rpx solid #EEEEEE; margin-top: 10rpx;"></view>

			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>支付金额</view>
				<view style="color: greenyellow; font-size: 40rpx;">{{orderdemo?orderdemo.shop.sales:''}}</view>
			</view>
		</uni-card>
		
		
		
		<view style="font-size: 50rpx; width: 100%; padding-left: 30rpx;"> 订单信息</view>
		
		<uni-card :is-shadow="false" is-full
			style="width: 90%; border-radius: 15rpx; margin: auto; margin-top: 20rpx;">
		
		
		
			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>订单号</view>
				<view style=" font-size: 30rpx;">{{orderdemo?orderdemo.number:''}}</view>
			</view>
			
			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>下单时间</view>
				<view style=" font-size: 30rpx;">{{orderdemo?orderdemo.createTime:''}}</view>
			</view>
			
			
			
			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>车辆</view>
				<view style=" font-size: 30rpx;">{{orderdemo?orderdemo.car.carNumber:''}}</view>
			</view>
			
		
			
			
			<view style="display: flex; justify-content: space-between; color: black; margin-top: 20rpx;">
				<view>备注</view>
				<view style=" font-size: 30rpx;">{{orderdemo?orderdemo.car.carNumber:''}}</view>
			</view>
			
			
		</uni-card>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderdemo: null,
				orderid:null
				
			}
		},
		onLoad(options) {
			console.log(options)
			let e = JSON.parse(options.form)
			this.orderid = e.id;
			this.getorderlist()
		},
		methods: {
			getorderlist() {
				let that = this
				this.$http({
					url: `api/order/order/`+that.orderid,
					method: "get",
					success(res) {
						that.orderdemo = res.data.data
					}
				})
			},
			
		}
	}
</script>

<style>
	.top {
		width: 100%;
		height: 270rpx;
		background-color: #2f81fa;
	}
</style>